<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>英雄名录</title>
    <!--    抽取公共头部-->
    <div th:replace="share/common :: head"></div>
</head>
<body>

<!--抽取公共导航-->
<div th:replace="share/common :: menu(3)"></div>

<!--顶部图片-->
<div class="m-bg-type_outer" style="width: 100%;height: 40%">
    <img src="../static/images/typebg.jpg" th:src="@{/images/typebg.jpg}" alt="" class="ui m-bg image"
         style="width: 100%;height: 100%">
    <div class="m-bg-class_cover">
        <div class="ui container" style="position: relative ;bottom: -540px;" id="waypoint">
            <div class="m-font-size-title m-right-bottom" align="center" style="font-family:'STXingkai'">英雄名录</div>
            <div class="m-font-size-text-init-title m-margin-top" align="center">
                三年以来，在人民解放战争和人民革命中牺牲的人民英雄们永垂不朽！
                三十年以来，在人民解放战争和人民革命中牺牲的人民英雄永垂不朽！
                由此上溯到一千八百四十年，从那时起，为了反对内外年敌人，争取民族独立和自由幸福，在历次斗争中牺牲的人民英雄永垂不朽！
                ————人民英雄纪念碑碑文
            </div>
        </div>
    </div>
</div>

<br>
<br>
<br>

<!--中间内容-->
<div class="m-margin- animated fadeIn">
    <div class="ui container">
        <!--        分类-->
        <div class="ui segment m-padded-tb-large m-opacity">
            <div class="ui container" align="center">
                <div class="ui labeled button m-margin-tb-tiny" th:each="prvince :${provinces}">
                    <a  href="#" th:href="'/hero/1/6/?provinceId='+${prvince.provinceId}" class="ui basic button"
                       th:text="${prvince.provinceName}" th:classappend="${prvince.provinceId==curProvinceId?'red':''}"
                    th:id="${prvince.provinceId==curProvinceId?'provices':''}"
                    >好文</a>
                    <div class="ui basic  left pointing label" th:text="${total}"
                         th:if="${prvince.provinceId==curProvinceId}">24
                    </div>
                </div>
            </div>
        </div>

        <div class="ui top attached m-opacity segment">
            <div class="ui padded vertical segment m-padded-tb-large" th:each="hero :${heros}">
                <div class="ui middle aligned mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header">
                            <a th:href="'/detail/?heroId='+${hero.heroId}" th:text="${hero.title}"
                               class="m-black L-title-font">大圣，此去欲何?</a>
                        </h3>
                        <p class="m-text" th:text="${hero.description}">
                            戴上金箍，没法爱你；放下金箍，没法保护你。我知道上天不会给我第二次机会，曾经我们说好的永远，原来也仅仅只有，十二画，而已。“大圣，此去欲何?”“踏南天，碎凌霄。”“若一去不回……”“便一去不回”
                            其实很多时候，我们都是有机会的，最后真正放弃的，是我们自己。......</p>
                        <div class="ui grid">
                            <div class="eleven wide column">
                                <div class="ui mini horizontal link list">
                                    <!--                                    <div class="item">-->
                                    <!--                                        <img src="/static/images/me.jpg"  alt="" class="ui avatar image">-->
                                    <!--                                        <div class="content"><a href="#" target="_blank" class="header">oneStar</a></div>-->
                                    <!--                                    </div>-->
                                    <div class="item">
                                        <i class="calendar icon"></i><span
                                            th:text="${#dates.format(hero.createTime,'yyyy-mm-dd')}">2020-01-01</span>
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i> <span th:text="${hero.views}">2222</span>
                                    </div>
                                    <div class="item">
                                        <i class="comment outline icon"></i> <span
                                            th:text="${hero.commentCount}">2222</span>
                                    </div>
                                </div>
                            </div>
                            <div class="right aligned five wide column">
                                <!--                todo 用js渲染一下-->
                                <a href="#" target="_blank" name="type"
                                   class="ui red basic label m-padded-tiny m-text-thin">好文</a>
                            </div>
                        </div>
                    </div>
                    <!--图片部分-->
                    <div class="five wide column">
                        <a href="#" th:href="'/detail/?heroId='+${hero.heroId}" target="_blank">
                            <img src="../static/images/backimg1.jpg"
                                 style="width: 100%; height: auto;max-width: 100%; display: block;" alt=""
                                 class="ui rounded image" th:src="${hero.img}">
                        </a>
                    </div>

                </div>
            </div>
        </div>

        <!--分页-->
        <div class="ui bottom attached segment m-opacity stackable grid">
            <div class="three wide column" align="center" th:if="${hasPrevious}">
                <a class="item ui red base button"
                   th:href="'/hero/'+${current-1}+'/'+${limit}+'/?provinceId='+${curProvinceId}">上一页</a>
            </div>

            <div class="ten wide column" align="center">
                <p><span></span> <span></span></p>
            </div>

            <div class="three wide column" align="center" th:if="${hasNext}">
                <a class="item ui red base button"
                   th:href="'/hero/'+${current+1}+'/'+${limit}+'/?provinceId='+${curProvinceId}">下一页</a>
            </div>
        </div>

    </div>
</div>

<br>
<br>
<!--抽取公共底部栏-->
<div th:replace="share/common :: #footer"></div>

<!--    抽取公共js    -->
<div th:replace="share/common :: #js"></div>
<script>
    window.onload = function () {
        console.log( $("[name='type']").text(document.getElementById('provices').innerText));
    };
</script>
</body>
</html>